<template>
  <div class="home">
    <h1>登录后主页</h1>
  </div>

</template>

<script>
    export default {
        // name: "Home"
      data(){
        return{
          name:"amy"
        };
      },
      beforeRouteEnter(to,from,next){
        console.log("路由被调用");
        next();
      },
      beforeRouteUpdate(to,from,next){
        //在当前路由改变，但是该组件被复用时调用
        console.log(this.name);
        next();
      },
      beforeRouteLeave(to,from,next){
        //导航离开该组件的对应路由时调用
        console.log("去往的页面路径:",to.path);
        next();
      }
    }
    export  default router
</script>


<style scoped>

</style>
